package sk.gtug.googleek.client;

import sk.gtug.googleek.client.place.HomePlace;
import sk.gtug.googleek.client.place.UpcomingActivitiesPlace;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.SimplePanel;

public class Client implements EntryPoint {
	public static final GoogleekInjector injector = GWT.create(GoogleekInjector.class);
	
	@Override
	public void onModuleLoad() {
		final RootPanel rootPanel = RootPanel.get("rootContent");
		
		
//		injector.home().start(new AcceptsOneWidget() {
//			
//			@Override
//			public void setWidget(IsWidget w) {
//				rootPanel.clear();
//				rootPanel.add(w);
//			}
//		}, injector.bus());
		
		SimplePanel panel = new SimplePanel();
		rootPanel.add(panel);
		
		injector.activityManager().setDisplay(panel);
		injector.placeHistoryHandler().handleCurrentHistory();
		injector.placeController().goTo(new HomePlace());
	}

}
